/**
 * 
 */
package note;

/**
 * @author haiyuzha
 *
 */

import javax.swing.*;

import java.awt.*;

public class NotePanel extends JPanel {
	public NotePanel() {
		setLayout(new BorderLayout());

		// Notebook list
		NotebookListPanel notebookListPanel = new NotebookListPanel();

		// Note list
		NoteListPanel noteListPanel = new NoteListPanel();

		// Text area
		JTextArea textArea = new JTextArea("A brand new has began, let's open our brace and embark" +
				" the bright future. We're destined to build a whole different new world." +
				" Let's go!");

		JScrollPane areaScrollPane = new JScrollPane(textArea);
		areaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
		areaScrollPane.setPreferredSize(new Dimension(100, 60));
		areaScrollPane.setBorder(BorderFactory.createCompoundBorder(
				BorderFactory.createTitledBorder("Plain text"), 
				BorderFactory.createEmptyBorder(5, 5, 5, 5)));

		JPanel leftPanel = new JPanel(new BorderLayout());
		leftPanel.add(notebookListPanel, BorderLayout.LINE_START);
		leftPanel.add(noteListPanel, BorderLayout.LINE_END);

		add(leftPanel, BorderLayout.WEST);
		add(areaScrollPane, BorderLayout.CENTER);
	}
}
